<html>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<head>
<title>Exercises</title>
<link rel="STYLESHEET" type="text/css" href="images/style.css">
<link rel="STYLESHEET" type="text/css" href="images/docsafari.css">
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><div STYLE="MARGIN-LEFT: 0.15in;"><a href="toc.html"><img src="images/team.gif" width="60" height="17" border="0" align="absmiddle"  alt="Team BBL"></a></div></td>
<td align="right"><div STYLE="MARGIN-LEFT: 0.15in;">
<a href=ch16lev1sec9.html><img src="images/prev.gif" width="60" height="17" border="0" align="absmiddle" alt="Previous Page"></a>
<a href=ch17.html><img src="images/next.gif" width="60" height="17" border="0" align="absmiddle" alt="Next Page"></a>
</div></td></tr></table>
<br><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td valign="top"><a name="ch16lev1sec10"></a>
<h3 class="docSection1Title">Exercises</h3>
<P><table border="0" cellspacing="16" cellpadding="0"><TR valign="top"><td align="right" class="docText" width="50"><a name="ch16qa1q1"></a><B><a class="docLink" href="app03lev1sec16.html#ch16qa1q1a1">16.1</a></b></TD><TD><p class="docText"><a name="idd1e126972"></a><a name="idd1e126977"></a>Write a program to determine your system's byte ordering.</p></TD></TR><TR valign="top"><td align="right" class="docText" width="50"><a name="ch16qa1q2"></a><B>16.2</b></td><TD><p class="docText">Write a program to print out which <tt>stat</tt> structure members are supported for sockets on at least two different platforms, and describe how the results differ.</P></TD></tr><TR valign="top"><TD align="right" class="docText" width="50"><a name="ch16qa1q3"></a><b><a class="docLink" href="app03lev1sec16.html#ch16qa1q3a3">16.3</a></b></TD><TD><p class="docText">The program in <a class="docLink" href="ch16lev1sec5.html#ch16fig15">Figure 16.15</a> provides service on only a single endpoint. Modify the program to support service on multiple endpoints (each with a different address) at the same time.</p></td></tr><tr valign="top"><TD align="right" class="docText" width="50"><a name="ch16qa1q4"></a><b>16.4</b></TD><td><p class="docText">Write a client program and a server program to return the number of processes currently running on a specified host computer.</P></td></tr><tr valign="top"><td align="right" class="docText" width="50"><a name="ch16qa1q5"></a><b><a class="docLink" href="app03lev1sec16.html#ch16qa1q5a5">16.5</a></b></td><td><p class="docText">In the program in <a class="docLink" href="ch16lev1sec5.html#ch16fig16">Figure 16.16</a>, the server waits for the child to execute the <tt>uptime</tt> command and exit before accepting the next connect request. Redesign the server so that the time to service one request doesn't delay the processing of incoming connect requests.</p></td></tr><tr valign="top"><td align="right" class="docText" width="50"><a name="ch16qa1q6"></a><b><a class="docLink" href="app03lev1sec16.html#ch16qa1q6a6">16.6</a></b></td><td><p class="docText">Write two library routines: one to enable asynchronous I/O on a socket and one to disable asynchronous I/O on a socket. Use <a class="docLink" href="ch16lev1sec8.html#ch16fig21">Figure 16.21</a> to make sure that the functions work on all platforms with as many socket types as possible.</p></td></TR></table></P>

<a href="17021535.html"><img src="images/pixel.gif" alt="" width="1" height="1" border="0"></a><ul></UL></TD></TR></table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><div STYLE="MARGIN-LEFT: 0.15in;"><a href="toc.html"><img src="images/team.gif" width="60" height="17" border="0" align="absmiddle"  alt="Team BBL"></a></div></td>
<td align="right"><div STYLE="MARGIN-LEFT: 0.15in;">
<a href=ch16lev1sec9.html><img src="images/prev.gif" width="60" height="17" border="0" align="absmiddle" alt="Previous Page"></a>
<a href=ch17.html><img src="images/next.gif" width="60" height="17" border="0" align="absmiddle" alt="Next Page"></a>
</div></td></tr></table>
</body></html><br>
<table width="100%" cellspacing="0" cellpadding="0"
style="margin-top: 0pt; border-collapse: collapse;"> 
<tr> <td align="right" style="background-color=white; border-top: 1px solid gray;"> 
<a href="http://www.zipghost.com/" target="_blank" style="font-family: Tahoma, Verdana;
 font-size: 11px; text-decoration: none;">The CHM file was converted to HTM by Trial version of <b>ChmD<!--191-->ecompiler</b>.</a>
</TD>
</TR><tr>
<td align="right" style="background-color=white; "> 
<a href="http://www.etextwizard.com/download/cd/cdsetup.exe" target="_blank" style="font-family: Tahoma, Verdana;
 font-size: 11px; text-decoration: none;">Download <b>ChmDec<!--191-->ompiler</b> at: http://www.zipghost.com</a>
</TD></tr></table>
